<?php
###
#  Baing PHP 框架 1.0.0
#  http://baing.co/
#
#  Copyright: 白晓阳
#  License: CC BY-NC-SA 4.0
#  https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh
###

namespace bai\feature;

use bai\resource\document\Cache;


trait CacheFileStatic
{
    private static function loadCacheFile(string $path)
    {
        if (defined('DEV')) return self::refreshCacheFile($path);
        $cache = Cache::load($path);
        return $cache ?: self::refreshCacheFile($path);
    }

    abstract private static function refreshCacheFile(string $path);
}